/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * NewJPanel.java
 *
 * Created on 15-Feb-2009, 00:03:05
 */

package edu.napier.soc.xfdm.exceptions;

import javax.swing.*;
import java.awt.*;

/**
 * @author Thomas
 */
class ExceptionPanel extends javax.swing.JPanel {

	/**
	 * Creates new form NewJPanel
	 */
	public ExceptionPanel(String message, String error) {
		initComponents();
		messageLabel.setText(message);
		textArea.setText(error);
	}

	/**
	 * This method is called from within the constructor to
	 * initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is
	 * always regenerated by the Form Editor.
	 */
	@SuppressWarnings("unchecked")
	// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
	private void initComponents() {
		GridBagConstraints gridBagConstraints;

		scrollPane = new JScrollPane();
		textArea = new JTextArea();
		messageLabel = new JLabel();

		setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
		setLayout(new GridBagLayout());

		textArea.setBackground(SystemColor.controlHighlight);
		textArea.setColumns(75);
		textArea.setEditable(false);
		textArea.setRows(10);
		scrollPane.setViewportView(textArea);

		gridBagConstraints = new GridBagConstraints();
		gridBagConstraints.gridx = 0;
		gridBagConstraints.gridy = 1;
		gridBagConstraints.fill = GridBagConstraints.BOTH;
		gridBagConstraints.weightx = 1.0;
		gridBagConstraints.weighty = 1.0;
		add(scrollPane, gridBagConstraints);

		messageLabel.setLabelFor(textArea);
		gridBagConstraints = new GridBagConstraints();
		gridBagConstraints.fill = GridBagConstraints.BOTH;
		gridBagConstraints.weightx = 1.0;
		add(messageLabel, gridBagConstraints);
	}// </editor-fold>//GEN-END:initComponents


	// Variables declaration - do not modify//GEN-BEGIN:variables
	private JLabel messageLabel;
	private JScrollPane scrollPane;
	private JTextArea textArea;
	// End of variables declaration//GEN-END:variables

}
